package com.ruoyi.project.knowledge.InvalidBooks.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.knowledge.InvalidBooks.mapper.KnowledgeFailedBooksInfoMapper;
import com.ruoyi.project.knowledge.InvalidBooks.domain.KnowledgeFailedBooksInfo;
import com.ruoyi.project.knowledge.InvalidBooks.service.IKnowledgeFailedBooksInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 失效书籍信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-27
 */
@Service
public class KnowledgeFailedBooksInfoServiceImpl implements IKnowledgeFailedBooksInfoService 
{
    @Autowired
    private KnowledgeFailedBooksInfoMapper knowledgeFailedBooksInfoMapper;

    /**
     * 查询失效书籍信息
     * 
     * @param id 失效书籍信息主键
     * @return 失效书籍信息
     */
    @Override
    public KnowledgeFailedBooksInfo selectKnowledgeFailedBooksInfoById(Long id)
    {
        return knowledgeFailedBooksInfoMapper.selectKnowledgeFailedBooksInfoById(id);
    }

    /**
     * 查询失效书籍信息列表
     * 
     * @param knowledgeFailedBooksInfo 失效书籍信息
     * @return 失效书籍信息
     */
    @Override
    public List<KnowledgeFailedBooksInfo> selectKnowledgeFailedBooksInfoList(KnowledgeFailedBooksInfo knowledgeFailedBooksInfo)
    {
        return knowledgeFailedBooksInfoMapper.selectKnowledgeFailedBooksInfoList(knowledgeFailedBooksInfo);
    }

    /**
     * 新增失效书籍信息
     * 
     * @param knowledgeFailedBooksInfo 失效书籍信息
     * @return 结果
     */
    @Override
    public int insertKnowledgeFailedBooksInfo(KnowledgeFailedBooksInfo knowledgeFailedBooksInfo)
    {
        return knowledgeFailedBooksInfoMapper.insertKnowledgeFailedBooksInfo(knowledgeFailedBooksInfo);
    }

    /**
     * 修改失效书籍信息
     * 
     * @param knowledgeFailedBooksInfo 失效书籍信息
     * @return 结果
     */
    @Override
    public int updateKnowledgeFailedBooksInfo(KnowledgeFailedBooksInfo knowledgeFailedBooksInfo)
    {
        return knowledgeFailedBooksInfoMapper.updateKnowledgeFailedBooksInfo(knowledgeFailedBooksInfo);
    }

    /**
     * 批量删除失效书籍信息
     * 
     * @param ids 需要删除的失效书籍信息主键
     * @return 结果
     */
    @Override
    public int deleteKnowledgeFailedBooksInfoByIds(String ids)
    {
        return knowledgeFailedBooksInfoMapper.deleteKnowledgeFailedBooksInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除失效书籍信息信息
     * 
     * @param id 失效书籍信息主键
     * @return 结果
     */
    @Override
    public int deleteKnowledgeFailedBooksInfoById(Long id)
    {
        return knowledgeFailedBooksInfoMapper.deleteKnowledgeFailedBooksInfoById(id);
    }
}
